{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>导入Excel</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">导入文件：</label>
                            <input type="hidden" id="lay-excel" >
                            <div class="layui-input-block">
                                <div id="lay-upload">上传文件</div>
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    文件信息：
                                    <div class="layui-upload-list" id="lay-list">
                                    </div>
                                </blockquote>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" type="button" id="upload-excel">导入</button>
                                <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="all_div" style="display:none;width: 100%;height: 100%;position: absolute;z-index: 100;background: rgba(0,0,0,0.5);top: 0;left: 0;padding: 0;margin: 0;text-align: center;font-size: 20px;color: #FFF;line-height: 300px;">
    上传中...请耐心等待！
</div>
{include file="public/footer" /}
<script>
    var u = wk.uploadExcel({size:5,type:'xls,xlsx',url:"{:url('place/excelIn')}",domain:""}, '/admin/place/index');
    $('#upload-excel').on('click',function () {
        if(!$('#lay-excel').val()){
            wk.error('请选择文件');
            return;
        }else{
            $('.all_div').css('display','block');
        }
        u.upload();
    })
</script>
</body>
</html>
